zpurpose("This is a demonstration knowledge base that shows the major features\nof the ES (c) expert system shell and includes:\n\n * Goal directed backwards chaining\n * Forward chaining\n * A knowledge editor that builds facts and rules\n * An explanation facility that explains the knowledge\n * Fuzzy relations including:\n fz=, fz<, fz> and fz<>\n ")
zrule("final status #21",[ante("and",[["age",">","90"]])],[conse("final_status","=","very_old_retired_person",1)])
zrule("final status #22",[ante("and",[["status","=","retired_person"],["age",">","80"]])],[conse("final_status","=","old_retired_person",1)])
zrule("final status #23",[ante("and",[["person","=","youth"]])],[conse("final_status","=","long_way_to_retirement",1)])
zrule("final status #24",[ante("and",[["status","=","retired_person"],["work","=","government"]])],[conse("final_status","=","retired_govt_worker",1)])
zdetails("work","government","The person works for the federal, state or local government.\n")
zdetails("work","private_industry","The person is employeed by a non-government company.")
zdetails("sickness","none","The person has no visible physical sickness. This knowledge base\ndoes not take into consideration mental or emotional sicknesses.")
zdetails("sickness","flu","You may have high fever, feel miserable, and need\nto be confined in bed. You will not feel very\njolly.")
zdetails("person","middle_aged","Middle aged means between 39 and 60. If married, the\nperson probably has children in high school or possibly\nin college. Probably owns a home or townhouse.\n")
zrange("age",0,120)
zrange("height",0,8)
zexplain("sex","Sex means either male or female. For this knowledge base,\nsex does not mean having sexual intercourse.\n")
zexplain("salary","Salary is the amount of money you make, whether employeed by someone, or\nby yourself.\n")
zexplain("sickness","Sickness means you have some disease that may effect\nthe way you are perceived by others. i.e. your\ntemperatment may suffer because you have some disease.\n")
zexplain("skin","Wrinkles are little lines around and under eyes.\nAlso around forehead and mouth. Sometimes wrinkles\nare also on neck and hands.\n")
zexplain("final_status","")
zexplain("age","How many years from year born.")
zconclusion("person","=","youth","The person is a youth....\n")
zconclusion("person","=","okay","Okay is the conclusion....\n\n\n\njjj\nkkk\n")
zconclusion("class","=","poor","You are of the poor\n")
zconclusion("class","=","middle_class","Now, You are of the middle class\n")
zconclusion("class","=","rich","You are of the rich class...you can spend a lot without\nworrying about your financial condition.")
zreason("sex","Need to known which sex...")
zreason("person","")
zreason("work","The profession determines aspects of a person.\n ")
zreason("salary","Class in the USA is mainly determined by your salary.\n")
zreason("sickness","A sickness helps determine the disposition of\na person. \n")
zreason("skin","Condition of skin sometimes gives hints to \nthe person's age.\n")
zreason("final_status","")
zreason("nice","\nThis will help to determine if the person has a nice\ncharacter and personality. Useful if hiring someone\nthat needs to work with the public.")
zreason("age","Age is an important factor in determining attributes of a person\nincluding:\n * personality\n * career\n * health")
zsymbolic("helpful","Is person helpful?",["yes","no"],"sgl")
zsymbolic("pleasant","Is person pleasant?",["yes","no"],"sgl")
zsymbolic("nice","Is person nice?",["yes","no"],"sgl")
zsymbolic("courteous","Is person courteous?",["yes","no"],"sgl")
zsymbolic("sex","Sex of person? ",["male","female"],"sgl")
zsymbolic("work","What type of work does the person do?\n ",["government","private_industry"],"sgl")
zsymbolic("skin","What type of skin does the person have?\n",["wrinkled","mature","smooth"],"sgl")
zsymbolic("class","What economic class is the person? ",["middle_class","poor","rich"],"sgl")
zsymbolic("nasty","Is person nasty?",["yes","no"],"sgl")
zsymbolic("person","Type of person",["small_male","large_male","mid_teen","nice_senior","pre_schooler","male_pre_schooler","middle_aged","nice_person","child","youth","teenager","youthful","retired_male","retired_female","around_twenty","okay","nice_teen","small_girl","large person","substantial_person"],"sgl")
znumeric("age","Age of person?")
znumeric("weight","Weight of person?")
znumeric("salary","How much is your salary, expressed in thousands \nof dollars per annum.")